﻿@using OTE.Web.Infrastructure.Helper
<div id="page-top-outer">
    <!-- Start: page-top -->
    <div id="page-top">
        <!-- start logo -->
        <div id="logo">
            <a href="">@*<img src="@Url.Image("shared/logo.png")" width="156" height="40" alt="" />*@</a>
        </div>
        <!-- end logo -->
        <!--  start top-search -->
        <div id="top-search">
            <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        <input type="text" id="keyWord" value="Search" onblur="if (this.value=='') { this.value='Search'; }"
                            onfocus="if (this.value=='Search') { this.value=''; }" class="top-search-inp" />
                    </td>
                    <td>
                        <select id="searchType" class="styledselect">
                            <option value="Product">Product</option>
                            <option value="Category">Category</option>
                        </select>
                    </td>
                    <td>
                        <input type="image" onclick="SubmitSearch();" src="@Url.Image("shared/top_search_btn.gif")"  />
                    </td>
                </tr>
            </table>
        </div>
        <!--  end top-search -->
        <div class="clear">
        </div>
    </div>
    <!-- End: page-top -->
</div>
<script type="text/javascript">
    function SubmitSearch() {
        var keyWord = $('#keyWord').val();
        var searchType = $('#searchType').val();
        var url = '';

        if (keyWord != 'Search') {
            switch (searchType) {
                case 'Product': url = 'Product/Search/' + keyWord;
                    break;
                case 'Category': url = 'Category/Search/' + keyWord;
                    break;
            }

            location.href = '@Url.Content("~/Admin/")' + url;
        }
    }
</script>